package com.hochschild.proveedores.domain;

import java.io.Serializable;
import javax.persistence.*;

/**
 * The primary key class for the CatalogoDetalle database table.
 * 
 */
@Embeddable
public class CatalogoDetallePK implements Serializable {
	//default serial version id, required for serializable classes.
	private static final long serialVersionUID = 1L;
	private Integer idCatalogo;
	private String idItem;

    public CatalogoDetallePK() {
    }
    
    

	public CatalogoDetallePK(Integer idCatalogo, String idItem) {
		super();
		this.idCatalogo = idCatalogo;
		this.idItem = idItem;
	}



	public Integer getIdCatalogo() {
		return this.idCatalogo;
	}
	public void setIdCatalogo(Integer idCatalogo) {
		this.idCatalogo = idCatalogo;
	}

	public String getIdItem() {
		return this.idItem;
	}
	public void setIdItem(String idItem) {
		this.idItem = idItem;
	}

	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof CatalogoDetallePK)) {
			return false;
		}
		CatalogoDetallePK castOther = (CatalogoDetallePK)other;
		return 
			(this.idCatalogo == castOther.idCatalogo)
			&& this.idItem.equals(castOther.idItem);

    }
    
	public int hashCode() {
		final int prime = 31;
		int hash = 17;
		hash = hash * prime + ((int) this.idCatalogo);
		hash = hash * prime + this.idItem.hashCode();
		
		return hash;
    }



	@Override
	public String toString() {
		return "CatalogoDetallePK [idCatalogo=" + idCatalogo + ", idItem="
				+ idItem + "]";
	}
	
	
}